﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SistemaInformativoTuristico
{
    public partial class Formulario_web15 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnGuardar_Click(object sender, EventArgs e)
        {


            ClaseAdministradores clase = new ClaseAdministradores();
            bool r;


            MD5 md5= new MD5();
            Int32 idAdmin = 1;
            
            string password = md5.md5(txtContra.Text);

            

            r = clase.guardarDatosAdministrador(txtNombre.Text, password,txtCedula.Text,txtTelefono.Text);


            if (r == true)
            {
                Response.Write("<script languaje = javascript>alert('Inserto bien');</script>");

            }
            else
            {
                Response.Write("<script languaje= javascript>alert('Inserto mal');</script>");

            }


        }
    }
}